home *** CD-ROM | disk | FTP | other *** search
- unit FortLink;
-
- { TPFORT unit to link in fortran routines. See TPFORT.DOC for instructions. }
- { This file contains the interface section only. }
-
- interface
- uses Dos;
-
- type
- Extval = longint;
- Double_Ptr = ^double;
- RealArray = array[1..65520 div sizeof(double)] of double;
-
- const
- MaxProcs = 32; { Recompile this as large as necessary.
- Overhead is 4*maxprocs }
- Extra_Space : word = 1024; { Extra space for the Fortran loader's heap.
- Increase if loadfort fails with Exec error 8
- or Fortran complains }
- var
- FortLoaded : boolean; { True indicates Fortran routines are in memory }
- FortSafe : boolean; { True indicates you're in Fortran mode }
-
- function LoadFort(Prog:string;TPentry:pointer):boolean;
- { The procedure to load the fortran routines. Returns true on success. }
-
- procedure CallFort(ProcNum:word);
- { The procedure to call the Fortran routine number procnum }
-
- procedure FDouble(ProcNum:word);
- { Procedure which simulates a Fortran double precision function call }
-
- function Fort_External(ProcNum:word):Extval;
- { Returns value to be passed as an external reference }
-
- function Pas_External(Proc:pointer):Extval;
- { Returns value to be passed as an external reference for
- a Pascal procedure or specially constructed function
- }
-
- procedure Clean_External;
- { Routine to clean up stack after Fort_External or Pas_External }
-
- procedure Enter_Pascal;
- { Set up Pascal context. Always pair with Leave_Pascal! }
-
- procedure Leave_Pascal;
- { Restore Fortran context. Always pair with Enter_Pascal! }
-
-